Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(test): convert all postgres tests to use testcontainers #3268

Conversation

paullatzelsperger
Copy link
Member

@paullatzelsperger paullatzelsperger commented Jul 4, 2023

What this PR changes/adds

This PR converts all @PostgresqlDbIntegrationTest instances to @ComponentTests using Testcontainers. All tests - except E2e, that is.

Converting the E2E tests over seemed to be quite a large undertaking, given how we are using test extensions and all the static initialization stuff etc. If needed, we can do it in a subsequent PR.

Consequently, the @PostgresqlDbIntegrationTest annotation is only used for E2E tests anymore.

Why it does that

Decision to use test containers.

Further notes

  • .

Linked Issue(s)

Closes # <-- insert Issue number if one exists

Please be sure to take a look at the contributing guidelines and our etiquette for pull requests.

@paullatzelsperger paullatzelsperger added refactoring Cleaning up code and dependencies enhancement New feature or request build Anything related to the CI/CD Pipeline on Github Actions labels Jul 4, 2023
@paullatzelsperger
Copy link
Member Author

paullatzelsperger commented Jul 4, 2023

NB: this PR is based on another branch (PR #3266), that is one reason why the changeset is so large. once that is merged, i'll rebase this and mark it ready-for-review.

edit: this is done now, so it should be reviewable

@codecov-commenter
Copy link

codecov-commenter commented Jul 4, 2023

Codecov Report

Patch coverage: 78.54% and project coverage change: +6.22 🎉

Comparison is base (7019768) 66.19% compared to head (536dfba) 72.42%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3268      +/-   ##
==========================================
+ Coverage   66.19%   72.42%   +6.22%     
==========================================
  Files         846      843       -3     
  Lines       16998    17035      +37     
  Branches      940      948       +8     
==========================================
+ Hits        11252    12337    +1085     
+ Misses       5375     4305    -1070     
- Partials      371      393      +22     
Impacted Files Coverage Δ
...vault/hashicorp/HashicorpVaultHealthExtension.java 0.00% <0.00%> (ø)
...hicorp/model/CreateEntryRequestPayloadOptions.java 0.00% <0.00%> (ø)
.../java/org/eclipse/edc/vault/hashicorp/PemUtil.java 71.42% <71.42%> (ø)
...dc/vault/hashicorp/HashicorpVaultClientConfig.java 73.07% <73.07%> (ø)
...ipse/edc/vault/hashicorp/HashicorpVaultClient.java 77.65% <84.90%> (+76.16%) ⬆️
...edc/vault/hashicorp/HashicorpVaultHealthCheck.java 86.84% <86.84%> (ø)
.../vault/hashicorp/HashicorpCertificateResolver.java 87.50% <87.50%> (ø)
...ipse/edc/vault/hashicorp/model/HealthResponse.java 92.59% <92.59%> (ø)
...rg/eclipse/edc/vault/hashicorp/HashicorpVault.java 100.00% <100.00%> (+22.22%) ⬆️
...e/edc/vault/hashicorp/HashicorpVaultExtension.java 100.00% <100.00%> (+100.00%) ⬆️
... and 7 more

... and 77 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@paullatzelsperger paullatzelsperger force-pushed the feature/convert_postgres-tests_to_testcontainers branch 2 times, most recently from 536dfba to f107245 Compare July 6, 2023 12:22
@paullatzelsperger paullatzelsperger force-pushed the feature/convert_postgres-tests_to_testcontainers branch from f107245 to 97d4227 Compare July 6, 2023 12:25
@paullatzelsperger paullatzelsperger marked this pull request as ready for review July 6, 2023 12:26
@paullatzelsperger paullatzelsperger merged commit 6578c42 into eclipse-edc:main Jul 6, 2023
bjungs pushed a commit to imec-int/edc that referenced this pull request Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Anything related to the CI/CD Pipeline on Github Actions enhancement New feature or request refactoring Cleaning up code and dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants